﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ETA.IService;
using Ninject;
using NUnit.Framework;

namespace ETA.UnitTest
{
    [TestFixture]
    public class RegistrationBasicInfoServiceTest
    {
        private static IRegistrationBasicInfoService _IRegistrationBasicInfoService { set; get; }


        [SetUp]
        public void Init()
        {
            IKernel kernel = new StandardKernel(new NinjectModuleBuild());
            _IRegistrationBasicInfoService = kernel.Get<IRegistrationBasicInfoService>();
        }

        [Test]
        public void AddBasicInfoTest()
        {
            var req = new CreateRegistrationBasicInfoRequest
            {
                RegistrationBasicInfo = new Entity.RegistrationBasicInfo
                {
                    RegistrationBasicInfoId = Guid.NewGuid() + "",
                    RegistrationMainFormId = "b67ec7f0-e1cf-49ce-9213-23128f068c2c",
                    Advantage = "喜欢看书",
                    Age = 28,
                    Birthday = "1987-06-04",
                    Name = "孙龙飞",
                    NamePinyin = "sunlongfei",
                    SexEnum = DomainEnum.SexEnum.男,
                    EducationLevelEnum = DomainEnum.EducationLevelEnum.本科,
                    Blood = "A",
                    IDCard = "3209111987",
                    BirthPlace = "盐城",
                    HomeAddress = "潘黄",
                    Certificate = "CET-6",
                    PhoneNum = "88462413",
                    Mobile = "1891236",
                    IsMarried = false,
                    Height = 170,
                    EyeLeft = 0.5m,
                    EyeRight = 0.5m,
                    EyeGlass = 150,
                    Weight = 65,
                    IsGotpassport = true,
                    HasAbroadExperience = true,
                    Interest = "游泳",
                    DisAdvantage = "呵呵",
                    Character = "善良",
                    OrginalJobs = "abcde#hijck#hehe",
                    NewJobs = "ddd#ccc#eeee"
                }
            };
            var rep = _IRegistrationBasicInfoService.CreateRegistrationBasicInfo(req);
            Assert.True(rep.Result.IsSuccess);
        }

    }
}
